package com.ldgame.game;

import org.lwjgl.util.vector.Vector2f;
import org.newdawn.slick.Color;

import com.ldgame.gfx.gfxelements.Label;
import com.ldgame.gfx.gfxelements.Sprite;
import com.ldgame.input.Input;

public class DeathState implements GameState {
	private Game game;
	private Sprite bg = new Sprite(new Vector2f(400.0f, 300.0f),
								   800.0f,
								   800.0f,
								   new Vector2f(96.0f, 0.0f),
								   new Vector2f(168.0f, 168.0f),
								   new Color(1.0f, 1.0f, 1.0f, 1.0f));
	private Label l1 = new Label(32.0f, new Color(1.0f, 0.7f, 0.0f, 1.0f));

	public DeathState(Game game) {
		this.game = game;
	}

	@Override
	public void handleInput() {
		if (Input.checkReleasedMouseBtn(0)) {
			game.setRunningGame(null);
			game.setGameState(game.getMenu());
		}
	}

	@Override
	public void calcConfig() {

	}

	@Override
	public void render() {
		bg.render();
		l1.render("You are dead,", new Vector2f(400.0f, 250.0f));
		l1.render("Donutia is screwed!", new Vector2f(400.0f, 350.0f));
	}
}
